/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.suarte.utils;

import java.io.Serializable;
import org.springframework.orm.hibernate3.HibernateTemplate;

/**
 * @date   Jan 6, 2011
 * @author Ggutierrez
 */
public class ObjectLookup {
    private HibernateTemplate hibernateTemplate;
    /** Creates a new instance of ObjectLookup */
    public ObjectLookup() {
    }

    public void setHibernateTemplate(HibernateTemplate template){
        this.hibernateTemplate = template;
    }
    
    public Object find(Object id, Class clazz){
        return hibernateTemplate.get(clazz, (Serializable)id);
    }
}
